EEPROM 14 Click
EEPROM 14 Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK's open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.
Click Library
- Author : Stefan Filipovic
- Date : Sep 2025.
- Type : I2C type
Software Support
Example Description
This example demonstrates basic read and write operations on the EEPROM 14 Click. The application writes predefined text messages into memory, then reads them back and logs the results for verification.
Example Libraries
- MikroSDK.Board
- MikroSDK.Log
- Click.EEPROM14
Example Key Functions
- eeprom14_cfg_setup This function initializes Click configuration structure to initial values.
void eeprom14_cfg_setup(eeprom14_cfg_t *cfg)
EEPROM 14 configuration object setup function.
EEPROM 14 Click configuration object.
Definition eeprom14.h:137
- eeprom14_init This function initializes all necessary pins and peripherals used for this Click board.
err_t eeprom14_init(eeprom14_t *ctx, eeprom14_cfg_t *cfg)
EEPROM 14 initialization function.
EEPROM 14 Click context object.
Definition eeprom14.h:120
- eeprom14_write_memory This function writes a sequence of bytes to the device memory over I2C, starting at the selected 16-bit address.
err_t eeprom14_write_memory(eeprom14_t *ctx, uint16_t address, uint8_t *data_in, uint8_t len)
EEPROM 14 write memory function.
- eeprom14_read_memory This function reads a sequence of bytes from the device memory over I2C, starting at the selected 16-bit address.
err_t eeprom14_read_memory(eeprom14_t *ctx, uint16_t address, uint8_t *data_out, uint16_t len)
EEPROM 14 read memory function.
Application Init
Initializes the logger, configures and initializes the EEPROM 14 Click.
{
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
if ( I2C_MASTER_ERROR ==
eeprom14_init( &eeprom14, &eeprom14_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
}
#define EEPROM14_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition eeprom14.h:107
void application_init(void)
Definition main.c:34
Application Task
Writes and reads text messages from EEPROM memory, displaying the stored values via the UART logger.
{
{
log_printf ( &logger, " Write data: %s\r\n", data_buf );
}
Delay_ms ( 100 );
memset ( data_buf, 0, sizeof ( data_buf ) );
{
log_printf ( &logger, " Read data: %s\r\n\n", data_buf );
}
Delay_ms ( 1000 );
{
log_printf ( &logger, " Write data: %s\r\n", data_buf );
}
Delay_ms ( 100 );
memset ( data_buf, 0, sizeof ( data_buf ) );
{
log_printf ( &logger, " Read data: %s\r\n\n", data_buf );
}
Delay_ms ( 1000 );
}
@ EEPROM14_OK
Definition eeprom14.h:154
#define EEPROM14_MEM_PAGE_SIZE
Definition eeprom14.h:75
void application_task(void)
Definition main.c:64
#define DEMO_TEXT_MESSAGE_2
Definition main.c:28
#define DEMO_TEXT_MESSAGE_1
Definition main.c:27
#define STARTING_ADDRESS
Definition main.c:29
Application Output
This Click board can be interfaced and monitored in two ways:
- Application Output - Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
- UART Terminal - Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.
Additional Notes and Information
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.